import { BrowserRouter,Routes, Route,Link } from 'react-router-dom'
import Home from './views/Home'
import About from './views/About'

export default function Root(props) {
  return (
    <BrowserRouter basename="/react">
    <h1> {props.name}</h1>
    <div>
    <Link to="/">Home</Link> | 
    <Link to="/about">About</Link>
    </div>
    <Routes>
      <Route path="/" element={<Home/>}></Route>
      <Route path="/about" element={<About/>}></Route>
    </Routes>
    </BrowserRouter>
  )
}
